package com.thoughtworks.android.androsphere;

import android.test.ActivityInstrumentationTestCase2;
import android.widget.Button;
import com.thoughtworks.android.androsphere.activity.MainMenuActivity;

public class MainMenuActivityTest extends ActivityInstrumentationTestCase2<MainMenuActivity> {
    private MainMenuActivity targetActivity;
    private Button composeButtonView;
    private Button deregisterButtonView;
    private Button registerButtonView;

    public MainMenuActivityTest() {
        super("com.thoughtworks.android.androsphere", MainMenuActivity.class);
    }

    @Override
    public void setUp() throws Exception {
        super.setUp();
        targetActivity = getActivity();
        composeButtonView = (Button) targetActivity.findViewById(R.id.compose);
        registerButtonView = (Button) targetActivity.findViewById(R.id.register);
        deregisterButtonView = (Button) targetActivity.findViewById(R.id.deregister);
    }

    public void testPreconditions() {
        assertNotNull(composeButtonView);
        assertNotNull(registerButtonView);
        assertNotNull(deregisterButtonView);
    }
}
